﻿using System.Collections.Generic;
using DomainModel.Support;

namespace Application.DTO
{
    public class BrokenBusinessRuleInfoMapper
    {
       public IEnumerable<BrokenBusinessRuleInfo> From(IEnumerable<BrokenBusinessRule> brokenRules)
        {
            foreach (var brokenBusinessRule in brokenRules)
            {
                yield return new BrokenBusinessRuleInfo() {ErrorMessage = brokenBusinessRule.Rule};
            }
        }
    }
}